﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true" StylesheetTheme="GlobleTheme" CodeBehind="MyPerformance.aspx.cs" Inherits="Runda.CMS.Portal.Finiance.MyPerformance" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">

    <script src="../Content/global.js" type="text/javascript"></script> 
    <script src="../Content/jquery-1.3.2.min.js" type="text/javascript"></script>    
    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" /> 
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Pager.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript"> 
     
         function OnRowDblClick(sender, eventArgs) {

             //alert("DblClick on row instance: " + eventArgs.get_itemIndexHierarchical());

         }

         $(function() {
             ///SetSum();
         })


         function SetSum() {

             var CustSum = $('#<%=hfcustsum.ClientID %>').val();
             var NatSum = $('#<%=hfNatSUm.ClientID %>').val();
             var ExchSum = $('#<%=hfExchSum.ClientID %>').val();
             var AccountPayable = $('#<%=hfAccountPayable.ClientID %>').val();
             var Reward = $('#<%=hfReward.ClientID %>').val();
             var Fine = $('#<%=hfFine.ClientID %>').val();
             //
             $('#ctl00_cphBody_gridList_ctl01').append("<tr class='GridFooter_OCM' style='white-space:nowrap;text-align:left;'><td>合计：" + CustSum + "个客户</td><td></td><td></td><td>" + NatSum + "</td><td>" + ExchSum + "</td><td>" + AccountPayable + "</td><td>" + Reward + "</td><td>" + Fine + "</td><td></td></tr>");
             //$('#ctl00_cphBody_AspNetPager1').before("<table cellspacing='0' border='0' border='0' width='100%'><tr class='GridFooter_OCM' style='white-space:nowrap;text-align:left;'><td width='40%'>合计：" + CustSum + "个客户</td><td width='12%'>" + NatSum + "</td><td width='12%'>" + ExchSum + "</td><td width='12%'>" + AccountPayable + "</td><td width='12%'>" + Reward + "</td><td width='12%'>" + Fine + "</td></tr></table>");
          }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">

<div class="Container">
        <table id="appFind" class="find" cellspacing="0" cellpadding="0" border="0"> 
            <tbody>
                <tr height="23">
                    <td class="wizHead" colspan="7">
                        <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0" width="100%" height="100%">
                            <colgroup>
                                <col>
                                <col width="60">
                                <col width="60"> 
                                <tr><td style="color:#ffffff"><b>查询</b></td><td class="icMenu mnuRight" noWrap></td></tr>
                        </table>
                    </td>
                </tr>
                <tr id="__appFind_trQuery" height="40">
                    <td class="wizBox1" colspan="7">
                    <table id="__appFind_tbQuery1" style="TABLE-LAYOUT: fixed; FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0" width="100%">
                    <tr>
                        <td align="right">客户名称</td><td>
                            <asp:TextBox ID="txtCustomerName" runat="server"></asp:TextBox></td><td><asp:Button ID="btnSearch" runat="server" Text="查找" CssClass="button" onclick="btnSearch_Click"/></td>
                        <td><asp:Button ID="btnExportExcel" runat="server" Text="导出(Excel)" CssClass="button" onclick="btnExportExcel_Click"/></td> 
                        <td><br><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='../finiance/应收账款奖惩申诉审批表填制方法.doc'>应收账款奖惩申诉审批表填制方法</asp:HyperLink>
                        </br><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='../finiance/应收奖惩申诉审批表.xls'>应收奖惩申诉审批表</asp:HyperLink></td>                           
                    </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
    </table>            
</div>

 <div class="Container">         
         <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap> 
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                    </td>
                </tr>
            </tbody>
        </table>       
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
            <asp:Panel runat="server" ID="panel1"> 
                <rad:RadGrid runat="server" ID="gridList"  EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True"  AutoGenerateColumns="False"  AllowPaging="false"
                    onitemdatabound="gridList_ItemDataBound" GridLines="None" AllowSorting="True" 
                    onsortcommand="gridList_SortCommand">
                    <ClientSettings EnableClientKeyValues="True">
                        <Selecting AllowRowSelect="True" />
                        <ClientEvents OnRowDblClick="OnRowDblClick" />
                    </ClientSettings>
                    <AJAXLoadingTemplate>
                        加载中...
                    </AJAXLoadingTemplate>
                    <MasterTableView DataKeyNames="cCusCode">
                        
                        <Columns>
                            <rad:GridTemplateColumn HeaderText="客户名称" SortExpression="CustomerName" 
                                Resizable="False">
                                <ItemStyle Width="22%"  />
                                <ItemTemplate>
                                    <div style="text-align:left">
                                        <%# Eval("CustomerName")%></div>
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="业务员" SortExpression="UserName" 
                                Resizable="true">
                                <ItemStyle Width="8%"  />
                                <ItemTemplate>
                                    <div style="text-align:left">
                                        <%# Eval("UserName")%></div>
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                            <rad:GridBoundColumn HeaderText="账龄(月)" DataField="Age"><ItemStyle Width="50px" /></rad:GridBoundColumn>
                            <rad:GridTemplateColumn HeaderText="发票总金额" SortExpression="iNatSum">
                                <ItemStyle Width="13%" />
                                <ItemTemplate>
                                    <div style="text-align:right">
                                        <%# string.Format("{0:N}",Eval("iNatSum"))%></div>
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="累计收款" SortExpression="iExchSum">
                                <ItemStyle Width="13%" />
                                <ItemTemplate>
                                    <div style="text-align:right">
                                        <%# string.Format("{0:N}", Eval("iExchSum"))%></div>
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="应收账款" SortExpression="AccountPayable">
                                <ItemStyle Width="13%" />
                                <ItemTemplate>
                                    <div style="text-align:right">
                                        <%# string.Format("{0:N}", Eval("AccountPayable"))%></div>
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="奖励" SortExpression="Reward">
                                <ItemStyle Width="13%" />
                                <ItemTemplate>
                                    <div style="text-align:right">
                                        <%# string.Format("{0:N}", Eval("Reward"))%></div>
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="罚息" SortExpression="Fine">
                                <ItemStyle Width="13%" />
                                <ItemTemplate>
                                    <div style="text-align:right">
                                        <%# string.Format("{0:N}", Eval("Fine"))%></div>
                                </ItemTemplate>
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="操作">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkbtnView" runat="server">查看</asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="5%" />
                            </rad:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                </rad:RadGrid>  
                   <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" PageSize="15" 
                                CurrentPageButtonClass="cpb" 
                                CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条" 
                                FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" 
                                ShowCustomInfoSection="Left" Width="100%" LayoutType="Table"  
                                SubmitButtonClass="but" SubmitButtonText="转到" 
                 onpagechanged="AspNetPager1_PageChanged">
                            </webdiyer:AspNetPager>    
             </asp:Panel>
         </div>
    <asp:HiddenField ID="hfcustsum" runat="server" />
    <asp:HiddenField ID="hfNatSUm" runat="server" />
    <asp:HiddenField ID="hfExchSum" runat="server" />
    <asp:HiddenField ID="hfAccountPayable" runat="server" />
    <asp:HiddenField ID="hfReward" runat="server" />
    <asp:HiddenField ID="hfFine" runat="server" />
    
    <asp:Literal runat="server" ID="ltlScript" ></asp:Literal>
</asp:Content>
